package main

import (
	"github.com/go-kit/kit/transport/http"
	Endpoint2 "go-kit/demo2/Endpoint"
	"go-kit/demo2/Services"
	Transport2 "go-kit/demo2/Transport"
	netHttp "net/http"
)

//挂起一个HTTP 服务 并把请求 传递给service 层
func main() {

	user := Services.UserService{}
	endp := Endpoint2.GetUserEndPoint(user)

	serverHandler := http.NewServer(endp, Transport2.DecodeUserTransport, Transport2.EncodeUserTransport)

	netHttp.ListenAndServe(":8080", serverHandler)

}
